﻿#pragma execution_character_set("utf-8")
#include "AfternoonState.h"
#include <QDebug>
#include "EveningState.h"

AfternoonState::AfternoonState()
{

}

void AfternoonState::WriteProgram(shared_ptr<Work> work)
{
    if (work->getHour() < 17) {
        qDebug() << QString("当前时间：%1点 下午状态还不错，继续努力").arg(work->getHour());
    }
    else {
        work->setCurrent(shared_ptr<EveningState>(new EveningState()));
        work->WriteProgram();
    }
}
